import request from "@/utils/request.js";

export const addToCart = (cartData)=>{
    return request({
        url:'/user/cart/addCart',
        method:'post',
        data:cartData
    })
}

export const getCartList = ()=>{
    return request({
        url:'/user/cart/getCartList',
        method:'get'
    })
}

export const deleteCart = (flowerId)=>{
    return request({
        url:'/user/cart/deleteCart',
        method:'delete',
        params:{flowerId}
    })
}

export const updateCart = (flowerId,quantity)=>{
    return request({
        url:'/user/cart/updateCart',
        method:'put',
        params:{flowerId,quantity}
    })
}